<div class="users form">

	<div class="row">
		<div class="col-md-12">
			<div class="page-header">
				<h1><?php echo __('Adicionar Usuário'); ?></h1>
			</div>
		</div>
	</div>



	<div class="row">
		<div class="col-md-3">
			<div class="actions">
				<div class="panel panel-default">
					<div class="panel-heading">Ações</div>
						<div class="panel-body">
							<ul class="nav nav-pills nav-stacked">
								<li><?php echo $this->Html->link(__('<span class="glyphicon glyphicon-list"></span>&nbsp;&nbsp;Listar Usuários'), array('action' => 'index'), array('escape' => false)); ?></li>
							</ul>
						</div>
					</div>
				</div>			
		</div><!-- end col md 3 -->
		<div class="col-md-9">
		
			<?php echo $this->Form->create('User', array('role' => 'form')); ?>
			<div class="row">
					<div class="form-group col-md-12">
						<?php if(isset($erro)){
							foreach ($erro as $erros){
								echo $erros."<br>";	
							}
						}
						?>
					</div>
				
				</div>
				<div class="row">
					<div class="form-group col-md-6">
						<?php echo $this->Form->input('username', array('label' => 'Usuário', 'class' => 'form-control', 'placeholder' => 'Username'));?>
					</div>
					<div class="form-group col-md-6">
						<?php echo $this->Form->input('password', array('label' => 'Senha', 'class' => 'form-control', 'placeholder' => 'Password'));?>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-md-4">
						<?php echo $this->Form->input('role', array( 'label' => 'Tipo de acesso',
								'options' => array('admin' => 'Administrador', 'author' => 'Usuário'),
								'class' => 'form-control', 'placeholder' => 'Tipo de acesso'));?>
					</div>
					<div class="form-group col-md-8">
						<?php echo $this->Form->input('User.funcionario_id', array( 
								'class' => 'form-control', 'placeholder' => 'Funcionario Id'));?>
					</div>
				</div>
				<div class="form-group">
					<?php echo $this->Form->submit(__('Salvar'), array('class' => 'btn btn-default')); ?>
				</div>

			<?php echo $this->Form->end() ?>

		</div><!-- end col md 12 -->
	</div><!-- end row -->
</div>
